package com.example.wangda.smart_home_android_v12;

/**
 * Created by wangda on 2017/11/16.
 */

public class GlobalData {
    final public static int networkConnect = 1;
    final public static int networkUnConnect = 0;

    final public static int Clock = 1;
    final public static int unClock = 0;
    /*倒计时时间*/
    final public static int CountDown = 1800;
    //楼道灯光延时
    final public static int StairsLightDelay = 30;
    /*进门语音响应延时*/
    final public static int EnterTheDoorDelay = 60;

    private static int DoorDeviceOnlineSta = 0;
    private static int StairsDeviceOnlineSta = 0;
    private static int BedDeviceOnlineSta = 0;
    private static int BookDeviceOnlineSta = 0;
    private static int EnterTheDoor = 0;
    private static int UpTheStairs = 0;

    private static int hostKeepAlive = 0;
    /*wifi状态 默认已连接*/
    private static int WifiConnectSta = WifiStateBroadCast.connect;
    /*MQTT状态 默认未连接*/
    private static int mqttConnectSta = networkUnConnect;
    /*语音播报锁*/
    private static int musicPlayClock = unClock;

    public static int ReadDoorDeviceOnlineSta() {
        return DoorDeviceOnlineSta;
    }
    public static void SetDoorDeviceOnlineSta(int num) {
        DoorDeviceOnlineSta = num;
    }

    public static int ReadStairsDeviceOnlineSta() {
        return StairsDeviceOnlineSta;
    }
    public static void SetStairsDeviceOnlineSta(int num) {
        StairsDeviceOnlineSta = num;
    }

    public static int ReadBookDeviceOnlineSta() {
        return BookDeviceOnlineSta;
    }
    public static void SetBookDeviceOnlineSta(int num) {
        BookDeviceOnlineSta = num;
    }

    public static int ReadBedDeviceOnlineSta() {
        return BedDeviceOnlineSta;
    }
    public static void SetBedDeviceOnlineSta(int num) {
        BedDeviceOnlineSta = num;
    }

    public static void SetEnterTheDoor(int val) {EnterTheDoor = val;}
    public static int ReadEnterTheDoor(){
        return EnterTheDoor;
    }

    public static void SetUpTheStairs(int val){UpTheStairs = val;}
    public static int ReadUpTheStairs(){return UpTheStairs;}

    /*WIFI连接状态*/
    public static void SetWifiConnectSta(int val){WifiConnectSta = val;}
    public static int ReadWifiConnectSta(){return WifiConnectSta;}

    public static void SetMqttConnextSta(int val){mqttConnectSta = val;}
    public static int ReadMqttConnectSta(){return mqttConnectSta;}

    public static void SetHostKeepAlive(int val){hostKeepAlive = val;}
    public static int ReadHostKeepAlive(){return hostKeepAlive;}

    public static void SetMusicPlayClock(int val){musicPlayClock = val;}
    public static int ReadMuaicPlayClock(){return musicPlayClock;}
}
